package org.jeecg.eqp.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 设备主数据
 * @Author: shaolong
 * @Date: 2022-10-12
 * @Version: V1.0
 */
@Data
@TableName("eqp_equipinfo")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "eqp_equipinfo对象", description = "设备主数据")
public class EqpEquipinfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号", width = 15)
    @ApiModelProperty(value = "设备编号")
    @TableId
    private String serialno;
    /**
     * 设备名称
     */
    @Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private String name;
    /**
     * 类型 1:设备，2:工装， 3:夹具， 4:设备位置
     */
    @Excel(name = "类型 1:设备，2:工装， 3:夹具， 4:设备位置", width = 15, dicCode = "eqp_equipinfo@TYPE")
    @Dict(dicCode = "eqp_type")
    @ApiModelProperty(value = "类型 1:设备，2:工装， 3:夹具， 4:设备位置")
    private String type;
    /**
     * 产线
     */
    @Excel(name = "产线", width = 15, dictTable = "mes_line_cfg", dicText = "NAME", dicCode = "LINE")
    @Dict(dictTable = "mes_line_cfg", dicText = "NAME", dicCode = "LINE")
    @ApiModelProperty(value = "产线")
    private String line;
    /**
     * 工位
     */
    @Excel(name = "工位", width = 15, dictTable = "mes_line_op_cfg", dicText = "DESCRIPTION", dicCode = "OP")
    @Dict(dictTable = "mes_line_op_cfg", dicText = "DESCRIPTION", dicCode = "OP")
    @ApiModelProperty(value = "工位")
    private String op;
    /**
     * 工站
     */
    @Excel(name = "工站", width = 15, dictTable = "mes_line_stn_cfg", dicText = "STN", dicCode = "STN")
    @Dict(dictTable = "mes_line_stn_cfg", dicText = "STN", dicCode = "STN")
    @ApiModelProperty(value = "工站")
    private String stn;
    /**
     * 0bit: 是否允许生产 1bit:设备点检校验成功 2bit:设备校验 3bit:设备复检
     */
    @Excel(name = "0bit: 是否允许生产 1bit:设备点检校验成功 2bit:设备校验 3bit:设备复检", width = 15)
    @ApiModelProperty(value = "0bit: 是否允许生产 1bit:设备点检校验成功 2bit:设备校验 3bit:设备复检")
    private Integer status;

    @Excel(name = "供应商", width = 15)
    @ApiModelProperty(value = "供应商")
    private String supplier;
    /**
     * 启用时间
     */
    @Excel(name = "启用时间", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "启用时间")
    private Date utime;
    /**
     * 是否需要校验换型设备
     */
    @Excel(name = "是否需要校验换型设备", width = 15, dicCode = "isTrue")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否需要校验换型设备")
    private String eqpMc;
    /**
     * 是否需要校验换型设备位置
     */
    @Excel(name = "是否需要校验换型设备位置", width = 15, dicCode = "isTrue")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否需要校验换型设备位置")
    private String eqpRc;
    /**
     * 是否需要校验设备位置点检
     */
    @Excel(name = "是否需要校验设备位置点检", width = 15, dicCode = "isTrue")
    @Dict(dicCode = "yn")
    @ApiModelProperty(value = "是否需要校验设备位置点检")
    private String eqpSc;
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 更新时间
     */
    @Excel(name = "更新时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date ctime;
}
